#pragma once

#include "core/iengine.h"

namespace Demo {

class TileEnginePrivate;

class TileEngine : public Core::IEngine
{
public:
    TileEngine();
    virtual ~TileEngine();

    void initialization();

    void logic(const long& elapsedTimeMs);

    void draw();

    void onKeyDown(QKeyEvent *event);
    void onKeyUp(QKeyEvent *event);
    void onMouseUp(QMouseEvent *event);
    void onMouseDown(QMouseEvent *event);
    void onMouseMove(QMouseEvent *event);
    void onWheelMove(QWheelEvent *event);

    void createMap();
    void loadMap(const QString &path);
    void saveMap(const QString &path) const;

private:
    TileEnginePrivate *d;
};

} // namespace Demo
